#version 150

in vec3 Position;
in vec2 UV0;
out vec2 texCoord;
out float fogDistance;

uniform mat4 ProjMat;
uniform mat4 ModelViewMat;

void main() {
    gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0);
    texCoord = UV0;
    fogDistance = length((ModelViewMat * vec4(Position, 1.0)).xyz);
}